Direct current compensation system and method for scattering parameter rational functions

ABSTRACT

A direct current compensation method for S-parameter rational functions reads S-parameters f(sk), which are generated at given frequency sk, from a storage unit. An S-parameter, which is generated at frequency sk=0 is supplemented into the S-parameters f(sk), upon the condition that there is no S-parameter which is generated at the frequency sk=0. An S-parameter ration function is generated according to the S-parameters f(sk). A DC level of the S-parameter rational function is compensated to generate a compensated S-parameter rational function.

BACKGROUND

1. Technical Field

The present application is related to simulation systems for circuits, especially to a direct current (DC) compensation system and method for S-parameter rational functions.

2. Description of Related Art

S-parameters, also called scattering parameters, are used to describe signal-wave response of an n-port electrical network (circuit system) at given frequency.

S-parameters can be expressed by an S-parameter rational function, which is generated according to the S-parameters using a vector fitting algorithm. However, the S-parameter rational function generated using the vector fitting algorithm is an approximation, thus, may produce errors at a DC level of the signal-wave response of the n-port electrical networks.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of one embodiment of an electronic device comprising a DC compensation system.

FIG. 2 is a block diagram of one embodiment of function modules of the DC compensation system of FIG. 1.

FIG. 3 is a flowchart illustrating one embodiment of a DC compensation method for S-parameter rational functions.

FIG. 4 is a flowchart detailing block S14 of FIG. 3.

DETAILED DESCRIPTION

The application is illustrated by way of examples and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.

In general, the word “module” as used hereinafter, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, for example, Java, C, or Assembly. One or more software instructions in the modules may be embedded in firmware. It will be appreciated that modules may be comprised of connected logic units, such as gates and flip-flops, and may be comprised of programmable units, such as programmable gate arrays or processors. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of computer-readable medium or other computer storage device.

FIG. 1 is a block diagram of one embodiment of an electronic device 1 comprising a DC compensation system 10. The electronic device 1 further comprises a storage unit 11, a processor 12, and an output unit 13. The electronic device 1 may be a computer, a server, for example. The storage device 11 is configured for storing information of an N-port circuit system in a Touchstone format (such as *.SNP), including S-parameters f(sk) which are generated at different frequency sk. The Touchstone Format is stipulated by IBIS Associates. The DC compensation system 10 includes function modules (see below descriptions referring to FIG. 2), which are configured for reading the S-parameters f(sk) from the storage unit 11, generating a S-parameter rational function according to the S-parameters f(sk) using a vector fitting algorithm, compensating the DC level of the S-parameter rational function to generate a compensated S-parameter rational function, and outputting the compensated S-parameter rational function to the output unit 13, such as a display.

In the embodiment, the function modules of the DC compensation system 10 may include one or more computerized codes in the form of one or more programs that are stored in the storage unit 11. The storage unit 11 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid state memory devices. The one or more computerized codes of the DC compensation system 10 include instructions that are executed by the processor 12, to provide functions for the function modules of the DC compensation system 10.

FIG. 2 is a block diagram illustrating the function modules of the DC compensation system 10, according to some embodiments of the present disclosure. The function modules of the DC compensation system 10 may includes an acquisition module 101, a parameter check module 102, a parameter supplement module 103, a vector fitting module 104, a DC compensation module 105, a format conversion module 106, and an output module 107.

The acquisition module 101 reads the S-parameters f(sk) from the storage unit 11. As mentioned, the S-parameters describe signal-wave response of an n-port electrical network (circuit system), and are generated at given frequency sk.

The parameter check module 102 checks if there is an S-parameter which is generated at the frequency sk=0. It may be appreciated that, the S-parameter generated at the frequency sk=0 represents DC.

The parameter supplement module 103 supplements the S-parameter at frequency sk=0 using an interpolation method if there is no S-parameter which is generated at the frequency sk=0. It may be appreciated that, the interpolation method is a method of constructing new data points within the range of a discrete set of known data points.

The vector fitting module 104 generates an S-parameter ration function according to the S-parameters f(sk) using a vector fitting algorithm. In one embodiment, the S-parameter rational function is constituted by pole values p_(m) and residue values r_(m), and is shown below:

${{{S(s)} \approx {\hat{S}(s)}} = \begin{bmatrix} {{\hat{S}}_{11}(s)} & {{\hat{S}}_{12}(s)} & \ldots & {{\hat{S}}_{1N}(s)} \\ {{\hat{S}}_{21}(s)} & {{\hat{S}}_{22}(s)} & \ldots & {{\hat{S}}_{2N}(s)} \\ \ldots & \ldots & \ldots & \ldots \\ {{\hat{S}}_{N\; 1}(s)} & {{\hat{S}}_{N\; 2}(s)} & \ldots & {{\hat{S}}_{N\; N}(s)} \end{bmatrix}},{{{where}\mspace{14mu}{{\hat{S}}_{i\; j}(s)}} = {\sum\limits_{m = 1}^{M}{\frac{r_{m}^{i,j}}{s - p_{m}^{i,j}}.}}}$

The DC compensation module 105 compensates the DC level of the above S-parameter rational function to generate a compensated S-parameter rational function using the following steps:

-   -   (1) computing the pole values p_(m) using first formulas as         follows:

${p_{2u} = \frac{{u/100} + {j \cdot u}}{s_{N} - s_{1}}},{p_{{2u} - 1} = \frac{{u/100} - {j \cdot u}}{s_{N} - s_{1}}},$ where μ=1˜M/2, and M is a total number of the pole values.

-   -   (2) generating a matrix

$X{\text{:}\mspace{14mu}\begin{bmatrix} r_{1} \\ \ldots \\ r_{M} \\ d \\ {\overset{\sim}{r}}_{1} \\ \ldots \\ {\overset{\sim}{r}}_{M} \end{bmatrix}}$ using unknown variables r_(m), d, and {tilde over (γ)}_(m) of functions (σf)_(fit) and σ_(fit)(s). In one embodiment, the functions (σf)_(fit)(s) and σ_(fit)(s) are shown as follows:

${{\left( {\sigma\; f} \right)_{fit}(s)} = {{f(0)} + {s\left( {{\sum\limits_{m = 1}^{M}\frac{r_{m}}{s - p_{m}}} + d} \right)}}};{and}$ ${\sigma_{fit}(s)} = {{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}}{s - p_{m}}} + 1.}$

-   -   (3) Substituting the pole values p_(m) and the S-parameters         f(sk) into matrixes A and B. In one embodiment, the matrixes A         and B are shown as follows:

${{matrixA} = \begin{bmatrix} \frac{s_{1}}{s_{1} - p_{1}} & \ldots & \frac{s_{1}}{s_{1} - p_{M}} & s_{1} & \frac{- {f\left( s_{1} \right)}}{s_{1} - p_{1}} & \ldots & \frac{- {f\left( s_{1} \right)}}{s_{1} - p_{M}} \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \frac{s_{k}}{s_{k} - p_{1}} & \ldots & \frac{s_{k}}{s_{k} - p_{M}} & s_{k} & \frac{- {f\left( s_{k} \right)}}{s_{k} - p_{1}} & \ldots & \frac{- {f\left( s_{k} \right)}}{s_{k} - p_{M}} \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \frac{s_{K}}{s_{K} - p_{1}} & \ldots & \frac{s_{K}}{s_{K} - p_{M}} & s_{N} & \frac{- {f\left( s_{K} \right)}}{s_{K} - p_{M}} & \ldots & \frac{- {f\left( s_{K} \right)}}{s_{K} - p_{M}} \end{bmatrix}};{and}$ ${matrixB} = {\begin{bmatrix} {{f\left( s_{1} \right)} - {f(0)}} \\ \ldots \\ {{f\left( s_{k} \right)} - {f(0)}} \\ \ldots \\ {{f\left( s_{K} \right)} - {f(0)}} \end{bmatrix}.}$

-   -   (4) computing the unknown variables r_(m), d, and {tilde over         (γ)}_(m), using a formula X=(A^(T) A)⁻¹ A^(T) B, to get the         functions (σf)_(fit)(s) and σ_(fit)(s).     -   (5) recording the got (σf)_(fit)(s) as (σf)_(fit) _(—) _(old)(s)         upon the condition that steps (2)˜(4) are only executed one         time, and computing the pole values p_(m) again using a second         formula as follows:

${{\sigma_{fit}(s)} = {{{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}}{s - p_{m}}} + 1} = \frac{\prod\limits_{m = 1}^{M}\left( {s - z_{m}} \right)}{\prod\limits_{m = 1}^{M}\left( {s - p_{m}} \right)}}},$ where p_(m)=z_(m), m=1˜M.

-   -   (6) repeating steps (2)˜(4), determining if         |(σf)_(fit)(s)−(σf)_(fit) _(—) _(old)(s)|<tol, where the tol is         a predetermined error, and regarding the got (σf)_(fit)(s) as         the compensated S-parameter rational function.

The format conversion module 106 converts a format of the compensated S-parameter rational function to a standard format, for being compatible with HSPICE simulation software. The conversion is realized as follows: Firstly, expressing the S-parameters f(sk) using a following matrix:

${S(s)} = {\begin{bmatrix} {S_{11}(s)} & {S_{12}(s)} & \ldots & {S_{1N}(s)} \\ {S_{21}(s)} & {S_{22}(s)} & \ldots & {S_{2N}(s)} \\ \ldots & \ldots & \ldots & \ldots \\ {S_{N\; 1}(s)} & {S_{N\; 2}(s)} & \ldots & {S_{NN}(s)} \end{bmatrix}.}$ Secondly, substituting the S_(ij)(s), where i, j=1˜N, of the above matrix into the compensated S-parameter rational function, obtaining a matrix as follows:

${{{S(s)} \approx {\hat{S}(s)}} = \begin{bmatrix} {{\hat{S}}_{11}(s)} & {{\hat{S}}_{12}(s)} & \ldots & {{\hat{S}}_{1N}(s)} \\ {{\hat{S}}_{21}(s)} & {{\hat{S}}_{22}(s)} & \ldots & {{\hat{S}}_{2N}(s)} \\ \ldots & \ldots & \ldots & \ldots \\ {{\hat{S}}_{N\; 1}(s)} & {{\hat{S}}_{N\; 2}(s)} & \ldots & {{\hat{S}}_{NN}(s)} \end{bmatrix}},{{{where}\mspace{14mu}{{\hat{S}}_{ij}(s)}} = {{{\hat{S}}_{ij}(0)} + {{s\left( {{\sum\limits_{m = 1}^{M}\frac{r_{m}^{i,j}}{s - p_{m}^{i,j}}} + d^{i,j}} \right)}.}}}$ After that, converting the format of the compensated S-parameter rational function in to the standard format according to the Ŝ_(ij) (s):

${{{\hat{S}}_{ij}(s)} = {{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}^{i,j}}{s - p_{m}^{i,j}}} + {\overset{\sim}{d}}^{i,j} + {se}^{i,j}}},{where}$ ${{\overset{\sim}{r}}_{m}^{i,j} = {p_{m}^{i,j}r_{m}^{i,j}}},{{\overset{\sim}{d}}_{m}^{i,j} = {{{\hat{S}}_{ij}(0)} + {\sum\limits_{m = 1}^{M}r_{m}^{i,j}}}},{and}$ e_(m)^(i, j) = d_(m)^(i, j).

The output module 107 stores the compensated S-parameter rational function into the storage unit 11, and outputs the compensated S-parameter rational function to the output unit 13.

FIG. 3 is a flowchart illustrating one embodiment of a DC compensation method for S-parameter rational functions. The method being performed by execution of computer readable program code by the processor 12 of the electronic device 1. Depending on the embodiment, additional blocks in the flow of FIG. 3 may be added, others removed, and the ordering of the blocks may be changed.

In block S10, the acquisition module 101 reads the S-parameters f(sk), which are generated at given frequency sk, from the storage unit 11.

In block S11, the parameter check module 102 checks if there is an S-parameter which is generated at the frequency sk=0. Block S13 is implemented if there is an S-parameter which is generated at the frequency sk=0. Otherwise, block S12 is implemented if there is no S-parameter which is generated at the frequency sk=0.

In block S12, the parameter supplement module 103 supplements the S-parameter at frequency sk=0 using an interpolation method. It may be appreciated that, the interpolation method is a method of constructing new data points within the range of a discrete set of known data points.

In block S13, the vector fitting module 104 generates an S-parameter ration function according to the S-parameters f(sk) using a vector fitting algorithm. In one embodiment, the S-parameter rational function is constituted by pole values p_(m) and residue values r_(m), and is shown below:

${{{S(s)} \approx {\hat{S}(s)}} = \begin{bmatrix} {{\hat{S}}_{11}(s)} & {{\hat{S}}_{12}(s)} & \ldots & {{\hat{S}}_{1N}(s)} \\ {{\hat{S}}_{21}(s)} & {{\hat{S}}_{22}(s)} & \ldots & {{\hat{S}}_{2N}(s)} \\ \ldots & \ldots & \ldots & \ldots \\ {{\hat{S}}_{N\; 1}(s)} & {{\hat{S}}_{N\; 2}(s)} & \ldots & {{\hat{S}}_{NN}(s)} \end{bmatrix}},{{{where}\mspace{14mu}{{\hat{S}}_{ij}(s)}} = {\sum\limits_{m = 1}^{M}{\frac{r_{m}^{i,j}}{s - p_{m}^{i,j}}.}}}$

In block S14, the DC compensation module 105 compensates the DC level of the above S-parameter rational function to generate a compensated S-parameter rational function. The detailed description of block S14 refers to FIG. 4 below.

In block S15, the format conversion module 106 converts a format of the compensated S-parameter rational function to a standard format, for being compatible with HSPICE simulation software. The conversion is realized as follows: Firstly, expressing the S-parameters f(sk) using a following matrix:

${S(s)} = {\begin{bmatrix} {S_{11}(s)} & {S_{12}(s)} & \ldots & {S_{1N}(s)} \\ {S_{21}(s)} & {S_{22}(s)} & \ldots & {S_{2N}(s)} \\ \ldots & \ldots & \ldots & \ldots \\ {S_{N\; 1}(s)} & {S_{N\; 2}(s)} & \ldots & {S_{NN}(s)} \end{bmatrix}.}$ Secondly, substituting the S_(ij) (s), where i, j=1˜N, of the above matrix into the compensated S-parameter rational function, obtaining a matrix as follows:

${{{S(s)} \approx {\hat{S}(s)}} = \begin{bmatrix} {{\hat{S}}_{11}(s)} & {{\hat{S}}_{12}(s)} & \ldots & {{\hat{S}}_{1N}(s)} \\ {{\hat{S}}_{21}(s)} & {{\hat{S}}_{22}(s)} & \ldots & {{\hat{S}}_{2N}(s)} \\ \ldots & \ldots & \ldots & \ldots \\ {{\hat{S}}_{N\; 1}(s)} & {{\hat{S}}_{N\; 2}(s)} & \ldots & {{\hat{S}}_{NN}(s)} \end{bmatrix}},{{{where}\mspace{14mu}{{\hat{S}}_{ij}(s)}} = {{{\hat{S}}_{ij}(0)} + {{s\left( {{\sum\limits_{m = 1}^{M}\frac{r_{m}^{i,j}}{s - p_{m}^{i,j}}} + d^{i,j}} \right)}.}}}$ After that, converting the format of the compensated S-parameter rational function in to the standard format according to the Ŝ_(ij) (s):

${{{\hat{S}}_{ij}(s)} = {{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}^{i,j}}{s - p_{m}^{i,j}}} + {\overset{\sim}{d}}^{i,j} + {se}^{i,j}}},{where}$ ${{\overset{\sim}{r}}_{m}^{i,j} = {p_{m}^{i,j}r_{m}^{i,j}}},{{\overset{\sim}{d}}_{m}^{i,j} = {{{\hat{S}}_{ij}(0)} + {\sum\limits_{m = 1}^{M}r_{m}^{i,j}}}},{and}$ e_(m)^(i, j) = d_(m)^(i, j).

In block S16, the output module 107 stores the compensated S-parameter rational function into the storage unit 11, and outputs the compensated S-parameter rational function to the output unit 1.

FIG. 4 is a flowchart detailing block S14 of FIG. 3. The method being performed by execution of computer readable program code by the processor 12 of the electronic device 1. Depending on the embodiment, additional blocks in the flow of FIG. 4 may be added, others removed, and the ordering of the blocks may be changed.

In block S140, the DC compensation module 105 computing the pole values p_(m) using first formulas as follows:

${p_{2u} = \frac{{u/100} + {j \cdot u}}{s_{N} - s_{1}}},{p_{{2u} - 1} = \frac{{u/100} - {j \cdot u}}{s_{N} - s_{1}}},$ where μ=1˜M/2, and M is a total number of the pole values.

-   -   (7) In block S141, the DC compensation module 105 generates a         matrix

$X:\begin{bmatrix} r_{1} \\ \ldots \\ r_{M} \\ d \\ {\overset{\sim}{r}}_{1} \\ \ldots \\ {\overset{\sim}{r}}_{M} \end{bmatrix}$ using unknown variables r_(m), d, and {tilde over (γ)}_(m) of functions (σf)_(fit)(s) and σ_(fit)(s). In one embodiment, the functions (σf)_(fit)(s) and σ_(fit)(s) are shown as follows:

${{\left( {\sigma\; f} \right)_{fit}(s)} = {{f(0)} + {s\left( {{\sum\limits_{m = 1}^{M}\frac{r_{m}}{s - p_{m}}} + d} \right)}}};{and}$ ${\sigma_{fit}(s)} = {{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}}{s - p_{m}}} + 1.}$

In block S142, the DC compensation module 105 substitutes the pole values p_(m) and the S-parameters f(sk) into matrixes A and B. In one embodiment, the matrixes A and B are shown as follows:

${{matrixA} = \begin{bmatrix} \frac{s_{1}}{s_{1} - p_{1}} & \ldots & \frac{s_{1}}{s_{1} - p_{M}} & s_{1} & \frac{- {f\left( s_{1} \right)}}{s_{1} - p_{1}} & \ldots & \frac{- {f\left( s_{1} \right)}}{s_{1} - p_{M}} \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \frac{s_{k}}{s_{k} - p_{1}} & \ldots & \frac{s_{k}}{s_{k} - p_{M}} & s_{k} & \frac{- {f\left( s_{k} \right)}}{s_{k} - p_{1}} & \ldots & \frac{- {f\left( s_{k} \right)}}{s_{k} - p_{M}} \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \frac{s_{K}}{s_{K} - p_{1}} & \ldots & \frac{s_{K}}{s_{K} - p_{M}} & s_{N} & \frac{- {f\left( s_{K} \right)}}{s_{K} - p_{M}} & \ldots & \frac{- {f\left( s_{K} \right)}}{s_{K} - p_{M}} \end{bmatrix}};{and}$ ${matrixB} = {\begin{bmatrix} {{f\left( s_{1} \right)} - {f(0)}} \\ \ldots \\ {{f\left( s_{k} \right)} - {f(0)}} \\ \ldots \\ {{f\left( s_{K} \right)} - {f(0)}} \end{bmatrix}.}$

In block S143, the DC compensation module 105 computes the unknown variables r_(m), d, and {tilde over (γ)}_(m) using a formula X=(A^(T) A)⁻¹ A^(T) B, to get the functions (σf)_(fit)(s) and σ_(fit)(s).

In block S144, the DC compensation module 105 determines if blocks S141 to S143 are only executed one time. Block S145 is implemented if blocks S141 to S143 are only executed one time. Otherwise, block S147 is implemented if blocks S141 to S143 are executed more than one time.

In block S145, the DC compensation module 105 records the got (σf)_(fit)(s) as (σf)_(fit) _(—) _(old)(s).

In block S146, the DC compensation module 105 computes the pole values p_(m) again using a second formula as follows:

${{\sigma_{fit}(s)} = {{{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}}{s - p_{m}}} + 1} = \frac{\prod\limits_{m = 1}^{M}\left( {s - z_{m}} \right)}{\prod\limits_{m = 1}^{M}\left( {s - p_{m}} \right)}}},$ where p_(m)=z_(m), m=1˜M. After block S146, the flow returns to block S141 described above.

In block S147, the DC compensation module 105 determines if |(σf)_(fit)(s)−(σf)_(fit) _(—) _(old)(s)|<tol, where the tol is a predetermined error. Block S141 is repeated if |(σf)_(fit)(s)−(σf)_(fit) _(—) _(old)(s)≧tol. Otherwise, block S148 is implemented if |(σf)_(fit)(s)−(σf)_(fit) _(—) _(old)(s)|<tol.

In block S148, the DC compensation module 105 regards the got (σf)_(fit)(s) as the compensated S-parameter rational function.

While the disclosure has been described by way of example and in terms of preferred embodiment, it is to be understood that the disclosure is not limited thereto. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements. 

What is claimed is:
 1. A direct current (DC) compensation method for S-parameter rational functions, the method comprising: reading S-parameters f(sk) which are generated at given frequency sk from a storage unit, the S-parameters indicative of an n-port network; supplementing an S-parameter, which is generated at frequency sk=0, into the S-parameters f(sk) using an interpolation method, upon the condition that there is no S-parameter which is generated at the frequency sk=0; generating an S-parameter rational function according to the S-parameters f(sk) using a vector fitting algorithm; compensating a DC level of the S-parameter rational function to generate a compensated S-parameter rational function, comprising: (a) computing the pole values p_(m) using first formulas as follows: ${p_{2u} = \frac{{u/100} + {j \cdot u}}{s_{N} - s_{1}}},{p_{{2u} - 1} = \frac{{u/100} - {j \cdot u}}{s_{N} - s_{1}}},$ where u=1˜M/2, and M is a total number of the pole values; (b) generating a matrix X: $X:\begin{bmatrix} r_{1} \\ \ldots \\ r_{M} \\ d \\ {\overset{\sim}{r}}_{1} \\ \ldots \\ {\overset{\sim}{r}}_{M} \end{bmatrix}$ using unknown variables r_(m), d, and

of functions (σf)_(fit)(s) and σ_(fit)(s), wherein the functions (σf)_(fit)(s) and σ_(fit)(s) are shown as follows: ${{\left( {\sigma\; f} \right)_{fit}(s)} = {{f(0)} + {s\left( {{\sum\limits_{m = 1}^{M}\frac{r_{m}}{s - p_{m}}} + d} \right)}}},{{{\sigma_{fit}(s)} = {{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}}{s - p_{m}}} + 1}};}$ (c) substituting the pole values p_(m) and the S-parameters f(sk) into matrixes A and B, wherein the matrixes A and B are shown as follows: ${{{matrix}\; A} = \begin{bmatrix} \frac{s_{1}}{s_{1} - p_{1}} & \ldots & \frac{s_{1}}{s_{1} - p_{M}} & s_{1} & \frac{- {f\left( s_{1} \right)}}{s_{1} - p_{1}} & \ldots & \frac{- {f\left( s_{1} \right)}}{s_{1} - p_{M}} \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \frac{s_{k}}{s_{k} - p_{1}} & \ldots & \frac{s_{k}}{s_{k} - p_{M}} & s_{k} & \frac{- {f\left( s_{k} \right)}}{s_{k} - p_{1}} & \ldots & \frac{- {f\left( s_{k} \right)}}{s_{k} - p_{M}} \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \frac{s_{K}}{s_{K} - p_{1}} & \ldots & \frac{s_{K}}{s_{K} - p_{M}} & s_{N} & \frac{- {f\left( s_{K} \right)}}{s_{K} - p_{M}} & \ldots & \frac{- {f\left( s_{K} \right)}}{s_{K} - p_{M}} \end{bmatrix}},{{{{matrix}\; B} = \begin{bmatrix} {{f\left( s_{1} \right)} - {f(0)}} \\ \ldots \\ {{f\left( s_{k} \right)} - {f(0)}} \\ \ldots \\ {{f\left( s_{K} \right)} - {f(0)}} \end{bmatrix}};}$ (d) computing the unknown variables r_(m), d, and

using a formula X=(A^(T) A)⁻¹ A^(T) B, to get the functions (σf)_(fit)(s) and σ_(fit)(s); (e) recording the got (σf)_(fit)(s) as (σf)_(fit) _(—) _(old)(s) upon the condition that steps (b)˜(d) are only executed one time, and computing the pole values p_(m) again using second formulas as follows: ${{\sigma_{fit}(s)} = {{{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}}{s - p_{m}}} + 1} = \frac{\prod\limits_{m = 1}^{M}\left( {s - z_{m}} \right)}{\prod\limits_{m = 1}^{M}\left( {s - p_{m}} \right)}}},$ where p_(m)=z_(m), m=1˜M; (f) repeating steps (b)˜(d), determining if |(σf)_(fit)(s)−(σf)_(fit) _(—) _(old)(s)|<tol, wherein the tol is a predetermined error, and regarding the got (σf)_(fit)(s) as the compensated S-parameter rational function; and storing the compensated S-parameter rational function into the storage unit.
 2. The DC compensation method as described in claim 1, wherein the S-parameters stored in the storage unit are in a Touchstone format.
 3. A non-transitory storage medium having stored thereon instructions that, when executed by a processor, cause the processor to perform a direct current (DC) compensation method for S-parameter rational functions, wherein the method comprises: reading S-parameters f(sk), which are generated at given frequency sk, from a storage unit; supplementing an S-parameter, which is generated at frequency sk=0, into the S-parameters f(sk), using an interpolation method, upon the condition that there is no S-parameter which is generated at the frequency sk=0; generating an S-parameter rational function according to the S-parameters f(sk) using a vector fitting algorithm; compensating a DC level of the S-parameter rational function to generate a compensated S-parameter rational function, comprising: (a) computing the pole p_(m) using first formulas as follows: ${p_{2u} = \frac{{u/100} + {j \cdot u}}{s_{N} - s_{1}}},{p_{{2u} - 1} = \frac{{u/100} - {j \cdot u}}{s_{N} - s_{1}}},$ where u=1˜M/2, and M is a total number of the pole values; (b) generating a matrix: $X:\begin{bmatrix} r_{1} \\ \ldots \\ r_{M} \\ d \\ {\overset{\sim}{r}}_{1} \\ \ldots \\ {\overset{\sim}{r}}_{M} \end{bmatrix}$ using unknown variables r_(m), d, and {tilde over (γ)}_(m) of functions (σf)_(fit)(s) and σ_(fit)(s), wherein the functions (σf)_(fit)(s) and σ_(fit)(s) are shown as follows: ${{\left( {\sigma\; f} \right)_{fit}(s)} = {{f(0)} + {s\left( {{\sum\limits_{m = 1}^{M}\frac{r_{m}}{s - p_{m}}} + d} \right)}}},{{{\sigma_{fit}(s)} = {{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}}{s - p_{m}}} + 1}};}$ (c) substituting the pole values p_(m) and the S-parameters f(sk) into matrixes A and B, wherein the matrixes A and B are shown as follows: ${{{matrix}\; A} = \begin{bmatrix} \frac{s_{1}}{s_{1} - p_{1}} & \ldots & \frac{s_{1}}{s_{1} - p_{M}} & s_{1} & \frac{- {f\left( s_{1} \right)}}{s_{1} - p_{1}} & \ldots & \frac{- {f\left( s_{1} \right)}}{s_{1} - p_{M}} \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \frac{s_{k}}{s_{k} - p_{1}} & \ldots & \frac{s_{k}}{s_{k} - p_{M}} & s_{k} & \frac{- {f\left( s_{k} \right)}}{s_{k} - p_{1}} & \ldots & \frac{- {f\left( s_{k} \right)}}{s_{k} - p_{M}} \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \frac{s_{K}}{s_{K} - p_{1}} & \ldots & \frac{s_{K}}{s_{K} - p_{M}} & s_{N} & \frac{- {f\left( s_{K} \right)}}{s_{K} - p_{M}} & \ldots & \frac{- {f\left( s_{K} \right)}}{s_{K} - p_{M}} \end{bmatrix}},{{{{matrix}\; B} = \begin{bmatrix} {{f\left( s_{1} \right)} - {f(0)}} \\ \ldots \\ {{f\left( s_{k} \right)} - {f(0)}} \\ \ldots \\ {{f\left( s_{K} \right)} - {f(0)}} \end{bmatrix}};}$ (d) computing the unknown variables r_(m), d, and {tilde over (γ)}_(m) using a formula X=(A^(T) A)⁻¹ A^(T) B, to get the functions (σf)_(fit)(s) and σ_(fit)(s); (e) recording the got (σf)_(fit)(s) as (σf)_(fit) _(—) _(old)(s) upon the condition that steps (b)˜(d) are only executed one time, and computing the pole p_(m) again using a second formulas as follows: ${{\sigma_{fit}(s)} = {{{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}}{s - p_{m}}} + 1} = \frac{\prod\limits_{m = 1}^{M}\left( {s - z_{m}} \right)}{\prod\limits_{m = 1}^{M}\left( {s - p_{m}} \right)}}},$ wherein p_(m)=z_(m), m=1˜M; (f) repeating steps (b)˜(d), determining if |(σf)_(fit)(s)−(σf)_(fit) _(—) _(old)(s)|<tol, wherein the tol is a predetermined error, and regarding the got (σf)_(fit)(s) as the compensated S-parameter rational function; and storing the compensated S-parameter rational function into the storage unit.
 4. The non-transitory storage medium as described in claim 3, wherein the S-parameters stored in the storage unit are in a Touchstone format.
 5. An electronic device, comprising: at least one processor; storage unit; a display unit; one or more programs that are stored in the storage unit and are executed by the at least one processor, the one or more programs comprising: an acquisition module to read S-parameters f(sk), which are generated at frequency sk, from the storage unit 11; a parameter supplement module to supplement an S-parameter, which is generated at the frequency sk=0, into the S-parameters f(sk) using an interpolation method, upon the condition that there is no S-parameter which is generated at the frequency sk=0; a vector fitting module to generate an S-parameter rational function according to the S-parameters f(sk) using a vector fitting algorithm; a DC compensation module to compensate the DC level of the above S-parameter rational function to generate a compensated S-parameter rational function by: (a) computing the pole p_(m) using first formulas as follows: ${p_{2u} = \frac{{u/100} + {j \cdot u}}{s_{N} - s_{1}}},{p_{{2u} - 1} = \frac{{u/100} - {j \cdot u}}{s_{N} - s_{1}}},$ where u=1˜M/2, and M is a total number of the pole values; (b) generating a matrix $X:\begin{bmatrix} r_{1} \\ \ldots \\ r_{M} \\ d \\ {\overset{\sim}{r}}_{1} \\ \ldots \\ {\overset{\sim}{r}}_{M} \end{bmatrix}$ using unknown variables r_(m), d, and {tilde over (γ)}_(m)| of functions (σf)_(fit)(s) and σ_(fit)(s), wherein the functions (σf)_(fit)(s) and σ_(fit)(s) are shown as follows: ${{\left( {\sigma\; f} \right)_{fit}(s)} = {{f(0)} + {s\left( {{\sum\limits_{m = 1}^{M}\frac{r_{m}}{s - p_{m}}} + d} \right)}}},{{{\sigma_{fit}(s)} = {{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}}{s - p_{m}}} + 1}};}$ (c) substituting the pole values p_(m) and the S-parameters f(sk) into matrixes A and B, wherein the matrixes A and B are shown as follows: ${{{matrix}\; A} = \begin{bmatrix} \frac{s_{1}}{s_{1} - p_{1}} & \ldots & \frac{s_{1}}{s_{1} - p_{M}} & s_{1} & \frac{- {f\left( s_{1} \right)}}{s_{1} - p_{1}} & \ldots & \frac{- {f\left( s_{1} \right)}}{s_{1} - p_{M}} \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \frac{s_{k}}{s_{k} - p_{1}} & \ldots & \frac{s_{k}}{s_{k} - p_{M}} & s_{k} & \frac{- {f\left( s_{k} \right)}}{s_{k} - p_{1}} & \ldots & \frac{- {f\left( s_{k} \right)}}{s_{k} - p_{M}} \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \frac{s_{K}}{s_{K} - p_{1}} & \ldots & \frac{s_{K}}{s_{K} - p_{M}} & s_{N} & \frac{- {f\left( s_{K} \right)}}{s_{K} - p_{M}} & \ldots & \frac{- {f\left( s_{K} \right)}}{s_{K} - p_{M}} \end{bmatrix}},{{{{matrix}\; B} = \begin{bmatrix} {{f\left( s_{1} \right)} - {f(0)}} \\ \ldots \\ {{f\left( s_{k} \right)} - {f(0)}} \\ \ldots \\ {{f\left( s_{K} \right)} - {f(0)}} \end{bmatrix}};}$ (d) computing the unknown variables r_(m), d, and

using a formula X=(A^(T) A)⁻¹ A^(T) B, to get the functions (σf)_(fit)(s) and σ_(fit)(s); (e) recording the got (σf)_(fit)(s) as (σf)_(fit) _(—) _(old)(s) upon the condition that steps (b)˜(d) are only executed one time, and computing the pole values p_(m) again using a second formula as follows: ${{\sigma_{fit}(s)} = {{{\sum\limits_{m = 1}^{M}\frac{{\overset{\sim}{r}}_{m}}{s - p_{m}}} + 1} = \frac{\prod\limits_{m = 1}^{M}\left( {s - z_{m}} \right)}{\prod\limits_{m = 1}^{M}\left( {s - p_{m}} \right)}}},$ where p_(m)=z_(m), m=1˜M; (f) repeating steps (b)˜(d), determining if |(σf)_(fit)(s)−(σf)_(fit) _(—) _(old)(s)|<tol, wherein the tol is a predetermined error, and regarding the got (σf)_(fit)(s) as the compensated S-parameter rational function; and an output module to store the compensated S-parameter rational function into the storage unit.
 6. The electronic device as described in claim 5, wherein the S-parameters stored in the storage unit are in a Touchstone format. 